﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RBS.Core.Model;
using RBS.Common;
namespace RBS.Core.DAL
{

    /// <summary>
    /// 数据访问类:站点配置
    /// </summary>
    public partial class Siteconfig
    {
        private static readonly object lockHelper = new object();

        /// <summary>
        ///  读取站点配置文件
        /// </summary>
        public Model.Siteconfig LoadConfig(string configFilePath)
        {
            return (Model.Siteconfig)SerializationHelper.Load(typeof(Model.Siteconfig), configFilePath);
        }

        /// <summary>
        /// 写入站点配置文件
        /// </summary>
        public Model.Siteconfig saveConifg(Model.Siteconfig model, string configFilePath)
        {
            lock (lockHelper)
            {
                SerializationHelper.Save(model, configFilePath);
            }
            return model;
        }

    }
}
